1
general::
An impudent or obnoxiously self-assertive individual, a wise guy, as in New teachers often have a hard time coping with the smart alecks in their classes. This expression, dating from the mid-1800s, probably alluded to a person of this description who was named Alec or Alexander, but his identity has been lost.
American Heritage Idioms